-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add Print::printf
#555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Print::printf
#555
Conversation
Added printf size_t printf(const char[], ...);
Added printf size_t printf(const char[], ...); implementation
Memory usage change @ 15699d4
Click for full report table
Click for full report CSV
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking the time to submit a pull request @bonezegei. This was previously proposed at #482 and declined for the reasons detailed here:
in the past, adding printf support has been discussed and rejected, see arduino/ArduinoCore-API#32 which tracks this issue and has some additional references, and also talks about better approaches.
In any case - if this would be implemented it would need to be supported on all architectures and its implementation would be arch-independent anyway, so the proper place to add (and/or discuss) this would be the ArduinoCore-API repository (which is not used by AVR yet, but should be in the future). In fact, that repo already has some PRs for implementing this (including one that is technically a bit cleaner than this PR, because it prints byte-by-byte without requiring a fixed-size buffer).
I'm going to go ahead and close this PR for these reasons, but know that your contributions are very much appreciated!
Since this proposal is the same as the previous one, I will extrapolate that the conclusion is also the same.
You are welcome to review the proposal in the arduino/ArduinoCore-API
repository. Discussion about the Arduino core API/Arduino Language is also welcome in the the recently created GitHub discussions repository here:
Added printf
size_t printf(const char[], ...);